from arpcheat import *
def scansc(hwsrc:0,psrc:0,hwdst:0,pdst:0):
    Ethernet = EthernetPkt()
    Ipv4 = Ipv4Pkt()
    Ipv6 = Ipv6Pkt()
    Tcp = TcpPkt()
    Udp = UdpPkt()
    Arp = ArpPkt()
    Dns = DnsPkt()
    Icmpv4 = Icmpv4Pkt()
    Icmpv6 = Icmpv6Pkt()
    HttpReq = HttpReqPkt()
    HttpRes = HttpResPkt()
    a=Packet(Ethernet, Ipv4, Ipv6, Tcp, Udp, Arp, Dns, Icmpv4, Icmpv6, HttpReq, HttpRes)
    a.flag['arp']=1
    Arp.hwsrc = hwsrc   #源MAC地址
    Arp.psrc = psrc    #源IP地址
    Arp.hwdst = hwdst   #目的MAC地址
    Arp.pdst = pdst    #目的IP地址
    return a
a=[scansc('ff:ff:ff:ff:ff:f0', '0.0.0.1', 'ff:ff:ff:ff:ff:f1', '0.0.0.2'),
    scansc('ff:ff:ff:ff:ff:f1', '0.0.0.1', 'ff:ff:ff:ff:ff:f2', '0.0.0.2'),
    scansc('ff:ff:ff:ff:ff:f2', '0.0.0.1', 'ff:ff:ff:ff:ff:f2', '0.0.0.2')
    ]

print(
arpcheat_check(a))
